package com.ruoyi.web.controller.wechat.response;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * TODO
 *
 * @author chenchuan2
 * @date 2023-01-16 15:11:45
 */
@AllArgsConstructor
public enum FromType {

    WECHAT("weapp", "微信小程序"),
    QQ("qq", "QQ小程序");

    @Getter
    private String name;

    @Getter
    private String desc;

    public static FromType query(String name) {
        FromType[] values = FromType.values();
        for (FromType type : FromType.values()) {
            if (type.getName().equals(name)) {
                return type;
            }
        }
        return FromType.WECHAT;
    }
}
